package io;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class TestOutputStream {

    public static void main(String[] args) throws IOException {
        //1.创建输出流
        OutputStream out=new FileOutputStream("d:\\a.txt");//默认会先删除文件内容在写
        //2.写数据
        out.write('和');//字节写  字符(2个字节)
        out.write('b');
        out.write('5');
        out.write('1');

        System.out.println("ok~~~");
    }
}
